#pragma once
#include <string>
#include <vector>
#include <map>

namespace linkfabric {
struct HostInfo {
    std::string hostname;
    std::string ip;
    int port;
    std::vector<int> activeChannels;
};

class Registry {
public:
    void registerHost(const HostInfo& host);
    std::vector<HostInfo> discover();
    int assignChannel(const std::string& hostname);
    void reportAck(const std::string& hostname, int channelId, uint16_t seq);

private:
    std::map<std::string, HostInfo> hostTable_;
};
}